cmake_minimum_required(VERSION 3.10)
project(asio_server)

# 设置 C++ 标准为 C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

set (3RD_DIR ${PROJECT_SOURCE_DIR}/thrid_party)

# 添加Boost
find_package(Boost REQUIRED COMPONENTS system)
find_package(Boost REQUIRED COMPONENTS asio)
find_package(Boost REQUIRED COMPONENTS array)

find_package(kcp REQUIRED)

add_subdirectory(common)

add_subdirectory(server)
add_subdirectory(client)
